package demo2;

import java.util.PriorityQueue;

public class Test {
    public static void main(String[] args) {
        //PriorityQueue 默认是小根堆存储
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();
        priorityQueue.offer(12);
        priorityQueue.offer(3);
        priorityQueue.offer(15);
        priorityQueue.poll();
        System.out.println(priorityQueue.poll());
        System.out.println(priorityQueue.poll());
    }
}
